const mongoose = require('mongoose');
const shopsModel = require('./shopsModel')
const adminModle = require('./adminModle')
const servicesSchema = new mongoose.Schema({
    name: String, // 服务名称
    price: String, // 服务价格
    desc: String, // 服务描述
    adminId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: adminModle
    }, // 门店所属管理员id
    shopsId: [
        {
            type: mongoose.Schema.Types.ObjectId,
            ref: shopsModel
        }
    ], // 所属门店id
})
module.exports = mongoose.model('servicesModel', servicesSchema, 'services');